Skip to content

[WOMBAT-606] User session start time fix - #438

Open
ntai-arxiv wants to merge 2 commits into
developfrom
WOMBAT-606-login-session-start-time-fix
Open

[WOMBAT-606] User session start time fix#438
ntai-arxiv wants to merge 2 commits into
developfrom
WOMBAT-606-login-session-start-time-fix

Conversation

@ntai-arxiv

Copy link
Copy Markdown
Contributor

No description provided.

@ntai-arxiv
ntai-arxiv requested review from a team, bdc34 and norbusan and removed request for norbusan July 16, 2026 15:32
# Floor start to whole seconds so epoch() is exact and the issued time never leads the clock;
# start_epoch and end both derive from this same floored instant.
start = datetime.now(tz=UTC).replace(microsecond=0)
start_epoch = int((start - datetime.fromtimestamp(0, tz=util.EASTERN)).total_seconds())

@bdc34 bdc34 Jul 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a little strange. Use of EASTERN seem odd with epoch and then going back to UTC.

Consider something like

start = datetime.now(tz=timezone.utc).replace(microsecond=0)
start_epoch = int(start.timestamp()) 
end = start + timedelta(seconds=util.get_session_duration())

@bdc34 bdc34 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange use of timezones but seems to work.

Consider using the minor suggested change.

@bdc34 bdc34 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please get rid of the poetry.lockfile and pyprojec.toml changes

The types are dev time use only?

Package management on the production arxiv-auth can be a pain and I don't want to get involved in it for dev dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants